﻿@model IEnumerable<sBlog.Net.Domain.Entities.PostEntity>
<div id="section1" class="menu" style="background-color: #e4f8ff;">
    <h2>
        <img src="@Url.Content("~/Content/Images/MlogThem/mlog-quote-icon.png")" width="22" height="15" alt="blash"/>&nbsp;&nbsp;bài
        viết mới</h2>
    <ul style="list-style-type: none;">
        @{
            int i = 1;
        }
        @foreach (var post in Model)
        {
            
            <li>
                @{if (i == 1)
                  {
                    @Html.Partial("PostRecent", post)
                    <div style="clear: both;">
                    </div>
                  }

                  else
                  {
                      //@{
                      var url = Url.RouteUrl("IndividualPost", new { year = post.PostYear, month = post.PostMonth, url = post.PostUrl, status = string.Empty });
                      var shortTitle = post.PostTitle.Length > 60 ? string.Format("{0}...", post.PostTitle.Substring(0, 40)) : post.PostTitle;
                      //}
                    <div class="postMostView">
                        <div class="imgLeft">
                            <a href="@url">
                                <img src="@Url.Content("http://s1.img.yan.vn/Mlog/UploadThumbs/80x80_" + post.PostAvatar)" style="border: none 0;" alt="avatar"/></a>
                        </div>
                        <div class="textRight">
                            <a href="@url" title="@post.PostTitle">@shortTitle</a>
                            <br />
                            <br />
                            <span class="posted" style="float: left;">
                                <img src="@Url.Content("~/Content/Images/MlogThem/IconView.png")" width="19" height="15" alt="Tags"/>&nbsp;@Html.Raw(post.ViewCount.ToString())&nbsp;
                                <img src="@Url.Content("~/Content/Images/MlogThem/heart-follow.png")" width="19" height="15" alt="Tags"/>&nbsp;@Html.Raw(post.LikeCount.ToString())
                            </span>
                        </div>
                    </div>
                  }
                  i++;
                }
            </li>
        }
    </ul>
</div>
